<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"> 

<h:head></h:head> 
<body> 
	<h:form id="msgSenderForm">
	<p:messages id="msgSending"></p:messages>
	<h:outputText value="输入短信内容（70字以内）" style="font-weight:bold;"></h:outputText>
	<h:outputText id="textLeft"></h:outputText>
	<br/>
	<h:inputTextarea id="text" value="#{msgSenderBean.text}"  style="width:400px;" onkeyup="checkMsgLength()"/>
	<br/>
	<br/>
	<h:outputText value="输入联系人（多个联系人用逗号隔开）" style="font-weight:bold;"></h:outputText>
	<br/>
	<h:inputTextarea style="width:400px;" id="phoneNumberInput" value="#{msgSenderBean.inputNumber}"></h:inputTextarea>
	<br/>
	<br/>
	<h:outputText value="群发给一个或多个用户组（可多选）" style="font-weight:bold;"></h:outputText>
	<br/>
	<h:selectManyCheckbox>
		<f:selectItems value="#{msgSenderBean.groupItems}"></f:selectItems>
	</h:selectManyCheckbox>
	<br/>
	<br/>
	<h:outputText value="上传联系人列表（excel）,不会保存在服务器" style="font-weight:bold;"></h:outputText>
	<br/>
	<p:fileUpload fileUploadListener="#{msgSenderBean.uploadContactsFileListener}" auto="true" allowTypes="*.xls;*.txt" update="msgSending uploadList"/>
	<p:dataList value="#{msgSenderBean.uploadedTitles}" var="t" id="uploadList" style="width:400px"> 
		<p:column>
			<h:outputText value="#{t}"/>
		</p:column>
	</p:dataList>
	<br/>
	<br/>
	<p:commandButton actionListener="#{msgSenderBean.sendMsg}" value="发送"/>
	</h:form>
</body> 
</html>
